package com.hl.mapper;

import com.hl.entity.Teacher;
import com.hl.entity.TeacherAndCollege;

import java.util.List;

public interface TeacherMapper {
    /**
     * 基础CRUD
     * */
    // 根据id查询
    Teacher selectTeacherById(int id);
    // 查询全部
    List<Teacher> selectAllTeachers();
    // 增加信息
    int addTeacher(Teacher teacher);
    // 根据id删除信息
    int deleteTeacherById(int id);
    // 批量删除
    int deleteTeacherByIds(List<Integer> ids);
    // 修改信息
    int updateTeacherById(Teacher teacher);

    /**
     * 模糊查询
     * */
    List<Teacher> selectTeacherLikeByName1(String str);
    List<Teacher> selectTeacherLikeByName2(String str);
    List<Teacher> selectTeacherLikeByName3(String str);

    /**
     * 动态SQL
     * */

    List<Teacher> selectTeacherDynamic1(Teacher teacher);
    List<Teacher> selectTeacherDynamic2(Teacher teacher);
    int updateTeacherDynamic(Teacher teacher);

    /**
     * 一对一联表查询
     * */
    List<TeacherAndCollege> selectTeacherAndCollege1();
    List<Teacher> selectTeacherAndCollege();
    List<Teacher> selectTeacherAndCollege3();


    List<Teacher> selectTeacherAndCourse();
    List<Teacher> selectTeacherAndCollegeAndCourse();

}
